package one.stand.service;

import com.github.pagehelper.PageInfo;
import com.sun.org.apache.xpath.internal.operations.Bool;
import one.stand.model.ResultModel;
import one.stand.request.essay.EssayTypeForm;
import one.stand.request.essay.EssayTypeQuery;
import one.stand.request.essay.EssayTypeRequest;
import one.stand.response.essay.EssayTypeResponse;

import java.util.List;

/**
 * 文章分类管理
 * @author luoyang
 * @date 2020/5/6 16:52
 */
public interface EssayTypeService {
    /**
     * 按id查询
     * @param id
     * @return
     */
    ResultModel<EssayTypeResponse> queryById(Long id);

    /**
     * 更新
     * @param request
     * @return
     */
    ResultModel<Boolean> update(EssayTypeForm request);

    /**
     * 添加
     * @param request
     * @return
     */
    ResultModel<Boolean> insert(EssayTypeRequest request);

    /**
     * 分页查询
     * @param request
     * @return
     */
    ResultModel<PageInfo<EssayTypeResponse>> queryPage(EssayTypeQuery request);


    /**
     * 删除分类
     * @param essayTypeId
     * @return
     */
    ResultModel<Boolean> deleteById(Long essayTypeId);

    ResultModel<List<EssayTypeResponse>> queryAllType(EssayTypeQuery request);
}
